<template>
	<view class="content">
		
		<view class="rowList" v-for="(item,index) in dataList" :key="index">
			<view class="time">{{item.time}}</view>
			<view class="flex-left">
				<view class="dataList" v-for="(items,indexs) in item.list" :key="indexs" @tap="inDetails(items.goods_id)">
					<image class="cover" :src="items.thumb_url" mode=""></image>
					<view class="name overflow_one fontSize13">{{items.goods_name}}</view>
					<view class="priceBox">
						<view class="price fontSemiBold">¥{{items.shop_price}}</view>
						<s class="priceBefore fontSize12" v-show="items.zs_price">¥{{items.zs_price}}</s>
					</view>
				</view>
			</view>
		</view>
		
		
		
	</view>
</template>
<style>
	.content{}
	.content .rowList{width: 95%;margin-left:2.5%;padding:2.5%;margin-top: 20upx;}
	.content .rowList .time{color:#262626;margin-bottom: 20upx;}
	.content .rowList .flex-left{display: flex;flex-wrap: wrap;}
	.content .rowList .dataList{width: 32%;margin-right: 1.3%;margin-bottom: 20upx;}
	.content .rowList .dataList .cover{width: 100%;height:222upx;border-radius: 10upx;}
	.content .rowList .dataList .name{color:#010101;font-weight: bold;margin:10upx 0 0upx 0}
	.content .rowList .dataList .priceBox{width: 100%;display: flex;justify-content: left;}
	.content .rowList .dataList .priceBox .price{height:60upx;line-height: 60upx;font-size: 32upx;color:#262626;font-weight: bold;}
	.content .rowList .dataList .priceBox .priceBefore{height:60upx;line-height: 60upx;margin-left: 10upx;color:#999999;}
</style>
<script>
	import Share from '@/common/wx_share.js'
	export default {
		data() {
			return {
				share:{
					title:"",
					path:'/pages/tabbar/index',
					imageUrl:'',
					desc:'',
					content:''
				},
				dataList:[
					// {
					// 	id:1,
					// 	time:"12.00",
					// 	list:[
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦1",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦2",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦3",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦4",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦5",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦6",price:12,beforePrice:321},
					// 	]
					// },
					// {
					// 	id:1,
					// 	time:"1.00",
					// 	list:[
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦1",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦2",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦3",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦4",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦5",price:12,beforePrice:321},
					// 		{id:11,src:"/static/del/del_1.png",title:"这是标题哦6",price:12,beforePrice:321},
					// 	]
					// }
				],
				pages:1

				
			}
		},
		onLoad(){
			this.AjaxLoad()
		},
		onReachBottom(){
			this.pages++
			this.AjaxLoad()
		},
		methods: {
			AjaxLoad(){
				var dataList = []
				let param={
					token:this._$userToken("userInfo").token,
					// token:"61a37939e67454853f97d91b33bed0279fb36d0d",
					page:this.pages,
				};
				this._$InitRequest.request("MemberInfo/get_browse_log", param).then(res => {
					res.data.list.forEach( (item) =>{
						dataList.push({
							id:item.id,
							time:item.date,
							list:item.browse_list
						})
					})
					for (var i = 0; i < dataList.length; i++){this.dataList.push( dataList[i] )}
				},error=>{})
			},
			inDetails(id){
				uni.navigateTo({
					url:"/pages_index/pages/details/details?id=" + id
				})
			},
			
		}
	}
</script>
<style lang="scss" scoped>
/deep/ .uni-input-input {font-size:32upx}
/deep/ .uni-radio-input-checked{background-color:rgb(110,43,34) !important;border:2upx solid white !important}
.content .html{
  ::v-deep {
    img {
      width: 100%;
    }
  }
}
</style>